WebPost

Note: This statement is only used in load test scripts. See Load Testing for more information.

Sends a POST command and returns the data received from a web page. If a referrer URL was specified by the WebSetReferrer statement, it is also sent with the request.

This statement uses the default application/x-www-form-urlencoded content type. Use the WebPostFromFile statement to post from other content types.

Syntax

WebPost("URL", "VariableName", "VariableValue", ...)

Arguments

Argument Description
URL URL to send the request to. Only supports http and https protocols. Relative paths are automatically prepended with the %URLROOT% repository variable.
VariableName Variable name to pass to the web page. You can pass multiple variables as part of the URL. Separate variable names and values with a comma.
VariableValue Variable value to pass to the web page. All values are automatically URL encoded when sent to the web server.

Return value

Value Description
Value Data received from the web page.

Example

result = WebPost("/wysicorp/reportbug.php", "uname", "Guest", "pswd", "SoloBug", "submit", "Login")